﻿using Caliburn.Micro;
using OPSYS_Schematic.BussinessLogic.EventMessage;
using OPSYS_Schematic.ShapeFoundation;
using OPSYS_Schematic.UIInfrastructure;

namespace OPSYS_Schematic.BussinessLogic.MenuPart
{
    [MenuPart(BaseMenu = WorkbenchName.OperationPart)]
    public class NodeCombiPart : UIInfrastructure.MenuPart
    {
        private IShapeOperation _shapeOperation;

        public NodeCombiPart() : base(WorkbenchName.NodeCombiPart)
        {
        }

        public override void Execute()
        {
            var _shapeOperation = IoC.GetInstance(typeof (IShapeOperation), OperateType.Select) as IShapeOperation;
            EventAggregator.Publish(new ShapeOperationMessage {ShapeOperation = _shapeOperation});
        }
    }
}